let someValue: any = "this is a string";

let strLength: number = (someValue as string).length;

someValue = 12;
let floatValue = (<number>someValue).toFixed(2)

// 别名
type myType = 1 | 2 | 3;
let number1:myType = 1;
let number2:myType = 2;
let number3:myType = 3;


// 联合类型

let param:()=>void | string[] | number
